New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose currencyCode on Product object in IAP module #25058
feat: expose currencyCode on Product object in IAP module #25058
Conversation
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
would love to have this backported to older versions :) |
557a9ad
to
94ca91a
Compare
First PR to Currency codes are often used in the front and backend for various reasons. Having that information readily available let's us categorize the expected income better and create estimations of revenue much more easily since we can take the currency that's there and get an idea of the value of the transaction. It is also often used by 3rd party billing services for the magic blackbox that is their products. On the front end, while we currently are able to get properly formatted string for the price, we can't really use the info that is there to 'continue the conversation' so to speak, here's an example:
If the currency code came back as 'EUR' we'd see "10,00 €", but if it came back as something else from Apple such as "XPF" we'd see "10 CFPF" instead. Apple is the source of truth for the currency a user is shown, we can't rely on anything else if we want the way we show pricing to be consistent across not only the app but also the native checkout dialogs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me
e48cd2b
to
0d73d7c
Compare
@svirs looks like lint is failing:
this lgtm otherwise tho! |
0d73d7c
to
b007d1c
Compare
@codebytere fixed! |
Would it all right to label this with |
@svirs That would require a minor bump and therefore needs to go through the release WG. I can tag it for review though 😄 |
Congrats on merging your first pull request! 🎉🎉🎉 |
Release Notes Persisted
|
I have automatically backported this PR to "10-x-y", please check out #25084 |
(tagging the actual backports with |
I have automatically backported this PR to "9-x-y", please check out #25085 |
Woo! Looking forward to the nightly thanks y'all! |
Description of Change
Add
currencyCode
toProduct
object thatinAppPurchase.getProducts
returns. resolves #25053Checklist
npm test
passesRelease Notes
Notes: Added the
currencyCode
field that Apple's StoreKit in-app-purchasing library provides but has not been added to theProduct
object thatinAppPurchase.getProducts
returns.